package com.ruoyi.chatgpt.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.enums.DiscountTypeEnum;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠折扣对象 gpt_discount
 * 
 * @author ruoyi
 * @date 2023-06-29
 */
public class GptDiscount extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 优惠码 */
    @Excel(name = "优惠码")
    private String code;

    /** 优惠类型 discount-折扣，exchange-兑换字数 */
    @Excel(name = "优惠类型 discount-折扣，exchange-兑换字数")
    private DiscountTypeEnum type;

    /** 具体优惠内容，折扣：为5-10的折扣值，兑换：为兑换的字数 */
    @Excel(name = "具体优惠内容，折扣：为5-10的折扣值，兑换：为兑换的字数")
    private BigDecimal quantity;

    /** 状态，1-正常，2-已使用，3-失效 */
    @Excel(name = "状态，1-正常，2-已使用，3-失效")
    private Integer status;

    /** 使用用户id */
    @Excel(name = "使用用户id")
    private Long userId;

    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date invalidTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setType(DiscountTypeEnum type)
    {
        this.type = type;
    }

    public DiscountTypeEnum getType()
    {
        return type;
    }
    public void setQuantity(BigDecimal quantity) 
    {
        this.quantity = quantity;
    }

    public BigDecimal getQuantity() 
    {
        return quantity;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setInvalidTime(Date invalidTime) 
    {
        this.invalidTime = invalidTime;
    }

    public Date getInvalidTime() 
    {
        return invalidTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("type", getType())
            .append("quantity", getQuantity())
            .append("status", getStatus())
            .append("userId", getUserId())
            .append("invalidTime", getInvalidTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
